def calculator():
    while True:
        num1 = int(input("请输入一个数字:"))
        operator = input("请输入一个操作符(+,-,*,/):")
        num2 = int(input("请输入一个数字:"))

        if operator == "+":
            result = num1 + num2
        elif operator == "-":
            result = num1 - num2
        elif operator == "*":
            result = num1 * num2
        elif operator == "/":
            result = num1 / num2
        else:
            print("输入不正确的操作符，退出")
            break

        print(f"结果: {num1} {operator} {num2} = {result}")
        
        choice = input("是否继续计算？（输入 'y' 继续，输入其他任意键退出）: ")
        if choice.lower() != 'y':
            print("谢谢使用，再见！")
            break

calculator()